home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / bgui12.lha / AmigaE / examples / ecomp < prev    next >
AmigaDOS Script File  |  1994-10-04  |  2KB  |  63 lines

  1. .key source/a,macro/a
  2. .bra {
  3. .ket }
  4. ;
  5. ;       $VER: EComp 1.0 (04.10.94)
  6. ;
  7. ;       Copyright 1994 Jaba Development.
  8. ;       Copyright 1994 Jan van den Baard.
  9. ;
  10. ;       This small script can be used to run a source through
  11. ;       Mac2E and EC resulting in an executable in one go.
  12. ;
  13. ;       For this to work you must do the following:
  14. ;
  15. ;       Setup an environment variable called MAC2EMACROS to
  16. ;       reflect the directory in which your pre-analized macro
  17. ;       files reside:
  18. ;
  19. ;               echo >ENVARC:MAC2EMACROS "E:PreAnalizeMacroFiles/"
  20. ;
  21. ;       Usage:  EComp SOURCE/A,MACRO/A
  22. ;
  23. ;       NAME:     Name of the source file without the .e!
  24. ;       MACRO:    Name of the macro file to use.
  25. ;
  26. ;       Currently this script can only handle one single macro file.
  27. ;-----------------------------------------------------------------------------
  28.  
  29. ;       Pre-compile the source file and
  30. ;       put the resulting code in t:{source}.e
  31. ;
  32. Mac2E {source}.e T:{source}.e $MAC2EMACROS$${macro}
  33. ;
  34. ;       Quietly optimize source output by
  35. ;       removing all TAG_IGNORE, 0 statements that
  36. ;       the macros introduced.
  37. ;
  38. IF EXISTS E:Bin/OptiMUI2E
  39.         OptiMUI2E >NIL: T:{source}.e T:{source}.e
  40. ENDIF
  41. ;
  42. ;       Compile pre-compiled source.
  43. ;
  44. Echo "Executing compiler..."
  45. EC T:{source} QUIET
  46. ;
  47. ;       Put the current directory in a variable.
  48. ;
  49. cd >ENV:dir{$$}
  50. ;
  51. ;       Copy the executable to the directory
  52. ;       from which the script was started.
  53. ;
  54. copy > NIL: T:{source} $dir{$$}
  55. ;
  56. ;       Clean up.
  57. ;
  58. delete > NIL: T:{source} T:{source}.e
  59. ;
  60. ;       Done...
  61. ;
  62. Echo "Done..."
  63.